import request from './request'
// 请求首页的数据
export const GetHomeLists = () => request.get('/index/index')

// 搜索功能
// export const GetSearchList = (params) => request.get('/search/helper', {params});
// 登陆请求 post
export const loginByWeb = (params) => request.post('/auth/loginByWeb',params);
///产品明细 
export const detailFn = (params) => request.get('goods/detail',{params});
//搜索框  实时搜索功能
export const GetSearchList = (params) => request.get('/search/helper', {params});
//搜索框 历史和热搜
export const SearchIndex = () => request.get('/search/index');
//搜索框 实时搜索功能
export const SearchHelper = (params) => request.get('/search/helper',{params});
//搜索框 产品列表
export const GoodsList= (params) => request.get('/goods/list',{params});
//搜索框 清除历史记录
export const SearchClearhistory= () => request.get('/search/clearhistory');

// 获取分类页面的数据
export const GetCategory = () => request.get('/catalog/index')

// 获取当前分类数据
export const GetNowCategory = (params) => request.get('/catalog/current', { params })

// 获取专题页数据
export const GetTopicData = (params) => request.get('/topic/list',{ params})

//相关产品数据的获取
export const GetRelatedDataFn = (params) => request.get('/goods/related',{params})
//获取购物车的数量
export const GetCartNumFn = (params) => request.get('/cart/goodscount',{params})
//加入购物车
export const GetAddtoCartFn = (params) => request.post('/cart/add',params)
// 品牌详情数据
export const GetBrandDetail = (params) => request.get('/brand/detail',{params})

//分类数据获取
export const ZCategoryApi = (params) => request.get("/goods/category", { params })
//分类页面商品列表请求
export const ZCategorylistApi = (params) => request.get("/goods/list", { params })


//获取购物车数据（含完成编辑）
export const ZGetCartIndex = () => request.get('/cart/index')
//点击切换商品选中状态（含全选）
export const ZCartCheckedApi = (params) => request.post("/cart/checked",params)
//商品步进器
export const ZCartUpdateApi = (params) => request.post("/cart/update",params)
//删除商品
export const ZCartDeleteApi = (params) => request.post("/cart/delete",params)
